package com.nuonuo.middleware.enums;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

/**
 * @author duan
 * @version 1.0
 * @date 2023/10/20 10:11
 */

public enum SpecialGoodsEnum {
    BZS_("0", "1", "不征税", "2"),
    BZS("0", "1", "不征税"),
    MS_("0", "1", "免税", "1"),
    MS("0", "1", "免税"),
    CKLS_("0", "1", "出口零税", "0"),
    CKLS("0", "1", "出口零税"),
    CKMS_("0", "1", "出口免税", "0"),
    CKMS("0", "1", "出口免税"),
    PTLSV_("0", "0", "", "3"),
    PTLSV("0", "0", "");

    private String SLV;
    private String YHZCBS;
    private String ZZSTSGL;
    private String LSLBS;
    private static final Map<String, SpecialGoodsEnum> NAME_MAP;
    private static final String SUFFIX = "_";

    private SpecialGoodsEnum(String SLV, String YHZCBS, String ZZSTSGL, String LSLBS) {
        this.SLV = SLV;
        this.YHZCBS = YHZCBS;
        this.ZZSTSGL = ZZSTSGL;
        this.LSLBS = LSLBS;
    }

    private SpecialGoodsEnum(String SLV, String YHZCBS, String ZZSTSGL) {
        this.SLV = SLV;
        this.YHZCBS = YHZCBS;
        this.ZZSTSGL = ZZSTSGL;
    }

    public static SpecialGoodsEnum getSpecialGoodsEnum(String SLV, String YHZCBS, String ZZSTSGL) {
        SpecialGoodsEnum specialGoodsReturn = null;
        SpecialGoodsEnum[] var4 = values();
        int var5 = var4.length;

        for(int var6 = 0; var6 < var5; ++var6) {
            SpecialGoodsEnum specialGoods = var4[var6];
            if (specialGoods.getSLV().equals(SLV) && specialGoods.getYHZCBS().equals(YHZCBS) && specialGoods.getZZSTSGL().equals(ZZSTSGL)) {
                specialGoodsReturn = getSpecialGoodsEnumByName(specialGoods.name());
                break;
            }
        }

        return specialGoodsReturn;
    }

    public static SpecialGoodsEnum getSpecialGoodsEnumByName(String name) {
        if (!name.contains("_")) {
            name = name + "_";
        }

        return (SpecialGoodsEnum)NAME_MAP.get(name);
    }

    public String getSLV() {
        return this.SLV;
    }

    public String getYHZCBS() {
        return this.YHZCBS;
    }

    public String getZZSTSGL() {
        return this.ZZSTSGL;
    }

    public String getLSLBS() {
        return this.LSLBS;
    }

    static {
        Map<String, SpecialGoodsEnum> map = new HashMap();
        SpecialGoodsEnum[] var1 = values();
        int var2 = var1.length;

        for(int var3 = 0; var3 < var2; ++var3) {
            SpecialGoodsEnum specialGoods = var1[var3];
            map.put(specialGoods.name(), specialGoods);
        }

        NAME_MAP = Collections.unmodifiableMap(map);
    }
}
